package cn.iocoder.springboot.lab17.dynamicdatasource.mapper;

import cn.iocoder.springboot.lab17.dynamicdatasource.constant.DBConstants;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
@DS(DBConstants.DATASOURCE_OLD_FIRE)
public interface OldFireMapper {

    List<Map<String, String>> list(@Param("tableName") String tableName,
                                   @Param("keyField") String keyField,
                                   @Param("oldFilePathField") String oldFilePathField,
                                   @Param("newFilePathField") String newFilePathField);

    void updateByKey(@Param("tableName") String tableName,
                     @Param("keyField") String keyField,
                     @Param("keyValue") String keyValue,
                     @Param("newFilePathField") String newFilePathField,
                     @Param("arrayList") String arrayList);
}
